package cn.sofwin.ms.web;

import cn.sofwin.core.support.api.RequestResult;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import org.springframework.web.client.RestTemplate;

@RestController
@RequestMapping("/consumer/user")
public class UserController {

    String url="http://ScProvider/api/user";

    @Autowired
    RestTemplate restTemplate;

    @GetMapping("")
    public RequestResult list(){
        return restTemplate.getForObject(url,RequestResult.class);
    }

}
